{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "#r\"/Users/mduranol/Dev/github/sharp-plot/SharpPlot/bin/Debug/netcoreapp3.1/SharpPlot.dll\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "Installing package MathNet.Numerics....................done!"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "data": {
      "text/html": [
       "Successfully added reference to package MathNet.Numerics, version 4.12.0"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "#r \"nuget:MathNet.Numerics\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "using System;\n",
    "using System.Linq;\n",
    "using SharpPlot;\n",
    "using MathNet.Numerics;\n",
    "using MathNet.Numerics.LinearAlgebra;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [],
   "source": [
    "var x = Enumerable.Range(-100, 201).Select(z=>z*0.025*Math.PI).ToArray();\n",
    "var sinX = x.Select(Math.Sin).ToArray();\n",
    "var data = new DataPoints(x, sincosX);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "using SharpPlot.Canvas;"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [],
   "source": [
    "Gnuplot.Start();\n",
    "var (id, fig) = Gnuplot.Plot<Line>(data, \"First Example: sin(x)\");\n",
    "Gnuplot.Show();"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": ".NET (C#)",
   "language": "C#",
   "name": ".net-csharp"
  },
  "language_info": {
   "file_extension": ".cs",
   "mimetype": "text/x-csharp",
   "name": "C#",
   "pygments_lexer": "csharp",
   "version": "8.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
